<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title> 热门物品 - <?=SITE_NAME?> </title>
<?php include VIEWS.'header.html'?>
<link rel="alternate" type="application/rss+xml" title="What's Hot in LooPo" href="<?php echo $_servername?>/whathot/xml/" />
</head>

<body>
<?php include VIEWS.'topbar.html'?>

<div id="content">

    <?php include VIEWS.'leftnav.html'?>

    <div id="right">

    <?php include VIEWS.'sidesearch.html'?>
    <h1>热门物品 &nbsp; <a title="使用RSS订阅本页更新" tabindex="100" href="<?php echo $_servername?>/whathot/xml/"><img src="/images/rss.gif" width="30" height="14" alt="RSS Feed" /></a> <a title="使用RSS邮天下订阅本页更新" href="http://www.emailrss.cn/?rss=<?php echo $_servername?>/whathot/xml/" target="_blank"><img width="42" height="13" src="/images/rssmail.gif" alt="RSS邮天下" /></a></h1>
    <div style="float:right" class="px12">
    &#8250; <script type="text/javascript">needHelp();</script><noscript><a href="<?php echo $_servername?>/forum/service/?from=itemlist" target="_blank">需要帮助？</a></noscript>&nbsp;&nbsp;
    </div>

    <!--
    <div class="px12" style="padding:1em;margin-bottom:1em;width:94%" id="timelimit">
        <ul class="inline">
            <li><a id="tl0" href="/whathot">有史有来</a></li>
            <li><a id="tl365" href="/whathot/1/365">一年</a></li>
            <li><a id="tl30" href="/whathot/1/30">一月</a></li>
            <li style="border:0"><a id="tl7" href="/whathot/1/7">本周热卖</a></li>
        </ul>
    </div>
    -->

<?php if (count($list)==0):?><div class="errbox roundNormal">&nbsp;&nbsp;&nbsp;暂时没有任何物品推荐，为何不看看我们有哪些<a tabindex="1" href="/whatnew" class="white">新品上架</a>。</div>
<?php else:?>

    <?php include VIEWS.'shopcarinfo.html'?>

<br clear="all" />
<div id="itemlist" class="itemlist">
<?php foreach ($list['list'] as $v):
$i++;
do_action('view_whathot_item', array('item'=>&$v));
?>
        <div class="px11" style="margin-right:10px;float:right;color:#808080">查看次数: <?php echo $v['views']?></div>
        <table style="margin-left:20px">
        <tr>
        <td width="200" align="center"><div id="item<?php echo $v['id']?>" class="items"><a href="/<?php echo $v['id']?>" style="background:transparent"><img src="/images/items/s/<?php echo $v['model']?>.gif" width="150" height="150" alt="<?php echo $v['name']?>" class="<?php echo ($v['stocknum'] == 0 ? '' : ' hand')?>" /></a></div></td>
        <td>
        <font class="price">&yen; <?php echo preg_replace('/^(\d+)\.(\d+)$/', '$1.<font size="-2">$2</font>', $v['price1'])?></font>
        <?php if($v['price2']>intval($v['price1'])):?>&nbsp;&nbsp;<font class="price_small">特价</font><?php endif?>
        <br />
        <b><a tabindex="2" href="/<?php echo $v['id']?>"><?php echo $v['name']?></a></b><br />
        <?php if($v['title']):?><b>说明：</b><?php echo $v['title']?><br /><?php endif;?>
        <b>材质：</b><?php echo $v['stuff']?><br />
        <?php
        //个性属性
        if(is_array($v['cols'])) {
            for($_i=1; $_i<=5; $_i++) {
                if ($v['cols']['key'.$_i] && $v['cols']['val'.$_i] && $v['cols']['key'.$_i] == '品牌') {
                    $brand = $v['cols']['val'.$_i];
                    if (strtolower($v['cols']['val'.$_i]) == 'loopo choice') $brand = 'LooPo';
                    echo "<b>{$v['cols']['key'.$_i]}：</b><a style='text-decoration:none' href='/brand/$brand'>{$v['cols']['val'.$_i]}</a><br />";
                }
            }
        }
        ?>
        <br />
        <?php if($v['stocknum'] == 0):?>
        <a tabindex="2" href="/alertme/<?php echo $v['id']?>" onclick="javascript:alertme(<?php echo $v['id']?>);return false"><span class="sprites btn_alertme">到货通知我</span></a>
        <?php else:?>
        <a tabindex="2" href="/addtocar/<?php echo $v['id']?>" onclick="javascript:addtocar(<?php echo $v['id']?>);this.href='#top'"><span class="sprites btn_addtocar">加入购物车</span></a>
        <script type="text/javascript">new Draggable('item<?php echo $v['id']?>',{revert:true,onDrag:function(element){__dg(element)},onEnd:function(element){__de(element)}})</script>
        <?php endif?>
        </td>
        </tr>
        </table>
        <?php if($i<>count($list['list'])):?><hr size="1" /><?php endif?>
<?php endforeach;?>
</div>

<br clear="all" />
<div style="text-align:center;">
<?php if($list['page']['next']):?>
<script type="text/javascript">var p=<?=$list['page']['p']?>;</script>
<a tabindex="3" href="/whathot/<?php echo $list['page']['next']?>" onclick="javascript:p++;if(p>=<?=$list['page']['totalpage']?>)this.hide();new Ajax.Updater('itemlist','/whathot/'+p+'?ajax=1',{insertion:'bottom'});this.href='/whathot/'+p;this.blur();return false;">更多热门……</a></div>
<?php else:?>
<a tabindex="3" href="/whathot">热门物品首页</a>
<?php endif;?>
</div>

<?php endif;?>

    </div>
</div>

<?php include VIEWS.'copyright.html'?>

</body>
</html>
